<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
<title><?php echo C('WEB_SITE_TITLE');?></title>
<link href="/Public/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/Public/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/Public/bootstrap/css/docs.css" rel="stylesheet">
<link href="/Public/bootstrap/css/onethink.css" rel="stylesheet">
<link href='/Public/bootstrap/css/lobster.css' rel='stylesheet' type='text/css'>


<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="/Public/bootstrap/js/html5shiv.js"></script>
<![endif]-->

<!--[if lt IE 9]>
<script type="text/javascript" src="/Public/jquery-1.10.2.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script type="text/javascript" src="/Public/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="/Public/bootstrap/js/bootstrap.min.js"></script>
<!--<![endif]-->

</head>
<body>
<!-- 头部 -->
<!-- 导航条
================================================== -->
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="http://www.doctorcao.com">天津曹开镛中医医院</a>
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar">x1</span>
                <span class="icon-bar">x2</span>
                <span class="icon-bar">x3</span>
            </button>
            <div class="nav-collapse collapse pull-right">
            </div>
        </div>
    </div>
</div>

<!-- /头部 -->

<!-- 主体 -->

    <header class="jumbotron subhead" id="overview">
        <div class="container">
            <div class="title">
                 <h1><a href="#"> Physical examination results query 体检结果查询 </a></h1>
            </div>
        </div>
    </header>

<div id="main-container" class="container">
    <div class="row">
        
            <!-- 左侧 nav
            ================================================== -->
            <!-- <div class="span3 bs-docs-sidebar">
                
                <ul class="nav nav-list bs-docs-sidenav">
                    <?php echo W('Category/lists', array($category['id'], ACTION_NAME == 'index'));?>
                </ul>
            </div> -->
        
        
    <div class="container">
        <div class='col-sm-6'>
            <div class="form-group">
                <div class="form-item cf">
                    <div class="controls">
                        <span>体检时间: &nbsp;&nbsp;&nbsp;&nbsp;</span><input id="querydate1" type="text" name="create_time1" class="text date" value="<?php echo ($tjrq1); ?>" placeholder="请选择日期" />
                        <input id="querydate2" type="text" name="create_time2" class="text date" value="<?php echo ($tjrq2); ?>" placeholder="请选择日期" />
                        <span>姓名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <input id="queryxm" type="text" name="create_time3" class="text" value="" placeholder="请输入姓名" />
                        <button id="querybutton" type="button" class="btn btn-primary">查询</button>
                        <button id="exportbutton" type="button" class="btn btn-primary">导出</button>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $('.date').datetimepicker({format: 'yyyy-mm-dd',language:"zh-CN",minView:2,autoclose:true});
                $("#querybutton").click(function(){
                    var querydate1 = document.getElementById("querydate1");
                    var querydate2 = document.getElementById("querydate2");
                    var xm = document.getElementById("queryxm");
                    if (xm.value==''){
                        window.location.href="/index.php?s=/Home/Examine&tjrq1="+querydate1.value+"&tjrq2="+querydate2.value;
                    } else {
                        window.location.href="/index.php?s=/Home/Examine&xm="+xm.value;
                    }
                    //alert("test");
                    // $(this).button('reset');
                });
                $("#exportbutton").click(function(){
                    var querydate1 = document.getElementById("querydate1");
                    var querydate2 = document.getElementById("querydate2");
                    window.location.href="/index.php?s=/Home/Examine/export&tjrq1="+querydate1.value+"&tjrq2="+querydate2.value;
                    //alert("test");
                    // $(this).button('reset');
                });

            });
        </script>
    </div>
    <script type="text/javascript" src="/Public/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="/Public/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <table class="table table-bordered">
        <thead>
        <tr>
            <th width="5%">体检日期</th>
            <th width="4%">姓名</th>
            <th width="7%">身份证号</th>
            <th width="10%">工作单位</th>
            <th width="3%">一般</th>
            <th width="3%">内科</th>
            <th width="3%">外科</th>
            <th width="3%">胸透</th>
            <th width="4%">心电图</th>
            <th width="3%">化验</th>
            <th width="3%">妇科</th>
            <th width="5%">体检结果</th>
        </tr>
        </thead>
        <tbody>
        <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "暂时没有数据" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><tr>
                <td><?php echo ($data["tjrq"]); ?></td>
                <td><?php echo ($data["xm"]); ?></td>
                <td><?php echo ($data["sfzh"]); ?></td>
                <td><?php echo ($data["address"]); ?></td>
                <td><?php echo ($data["keshi1"]); ?></td>
                <td><?php echo ($data["keshi2"]); ?></td>
                <td><?php echo ($data["keshi3"]); ?></td>
                <td><?php echo ($data["keshi4"]); ?></td>
                <td><?php echo ($data["keshi5"]); ?></td>
                <td><?php echo ($data["keshi6"]); ?></td>
                <td><?php echo ($data["keshi7"]); ?></td>
                <td><?php if(empty($data["note"])): ?>未出结果<?php else: echo ($data["note"]); endif; ?></td>
            </tr><?php endforeach; endif; else: echo "暂时没有数据" ;endif; ?>

        </tbody>
    </table>

    </div>
</div>
<script type="text/javascript">
    $(function(){
        $(window).resize(function(){
            $("#main-container").css("min-height", $(window).height() - 343);
        }).resize();
    })
</script>
<!-- /主体 -->

<!-- 底部 -->
<!-- 底部
================================================== -->
<footer class="footer">
    <div class="container">
        <p>Copyright © 2008.Copyright(C)2008 <a href="http://www.doctorcao.com" target="_blank">	天津曹开镛中医医院</a> All Rights Reserved
	</p>
    </div>
</footer>


 <!-- 用于加载js代码 -->
<div class="hidden"><!-- 用于加载统计代码等隐藏元素 -->
    
</div>

<!-- /底部 -->
</body>
</html>